package com.ddtech.business.practice.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.ddtech.business.common.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;

/**
 * <p>
 * 学员练习记录表
 * </p>
 *
 * @author bin_pu
 * @since 2023-05-26
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("practice_user_record")
@ApiModel(value="PracticeUserRecord对象", description="学员练习记录表")
public class PracticeUserRecord extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "练习名称")
    private String practiceName;

    @ApiModelProperty(value = "题库id")
    private String bankId;

    @ApiModelProperty(value = "学员id")
    private String userId;

    @ApiModelProperty(value = "学员部门id")
    private String deptId;

    @ApiModelProperty(value = "学员名称")
    private String userName;

    @ApiModelProperty(value = "是否完成练习")
    private Integer isFinish;

    @ApiModelProperty(value = "答对题数")
    private Integer rightCount;

    @ApiModelProperty(value = "答错题数")
    private Integer wrongCount;

    @ApiModelProperty(value = "练习得分")
    private Double source;

    @ApiModelProperty(value = "所用时长(秒)")
    private Long useTime;

    @ApiModelProperty(value = "检测类型，专项检测，综合检测")
    private String type;

    @ApiModelProperty(value = "开始时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime startTime;

    @ApiModelProperty(value = "结束时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime endTime;
}
